package simulation;

public class Data {
	private int value;
	private int address;

	public Data(int value, int address) {
		this.setValue(value);
		this.setAddress(address);
	}

	public String toString() {
		return "Data :address = " + getAddress() + ", value = " +  getValue() ;
	}
	
	public boolean equals(Object obj) {
		Data d = (Data) obj ;
		return this.getAddress()==d.getAddress();
	}

	public void setAddress(int address) {
		this.address = address;
	}

	public int getAddress() {
		return address;
	}

	public void setValue(int value) {
		this.value = value;
	}

	public int getValue() {
		return value;
	}
}
